﻿using GC_FFW.ForecastWriterClient.Abstractions.Factories;
using GC_FFW.ForecastWriterClient.Abstractions.Interfaces;
using GC_FFW.ForecastWriterClient.Enums;
using GC_FFW.ForecastWriterClient.ViewModels.Parameters;
using GC_FFW.ForecastWriterClient.WindowAdapters;

namespace GC_FFW.ForecastWriterClient.Factories
{
	public class WindowAdapterFactory : WindowAdapterBaseFactory
	{
		#region Constructors

		public WindowAdapterFactory(WindowBaseFactory windowFactory, WindowViewModelBaseFactories windowViewModelFactories)
			: base(windowFactory, windowViewModelFactories) { }

		#endregion

		#region Base Class Members

		public override IWindow CreateForecastManagerWindowAdapter(ForecastManagerViewModelParameters parameters)
		{
			return new ForecastManagerWindowAdapter(
				WindowFactory.CreateWindow(WindowType.ForecastManager),
				WindowViewModelFactories.CreateForecastManagerViewModelFactory(),
				parameters);
		}

		public override IWindow CreateMatchDataEditorWindowAdapter(MatchDataEditorViewModelParameters parameters)
		{
			return new MatchDataEditorWindowAdapter(
				WindowFactory.CreateWindow(WindowType.MatchDataEditor),
				WindowViewModelFactories.CreateMatchDataEditorViewModelFactory(),
				parameters);
		}

		public override IWindow CreateMatchEventsEditorWindowAdapter(MatchEventsEditorViewModelParameters parameters)
		{
			return new MatchEventsEditorWindowAdapter(
				WindowFactory.CreateWindow(WindowType.MatchEventsEditor),
				WindowViewModelFactories.CreateMatchEventsEditorViewModelFactory(),
				parameters);
		}

		public override IWindow CreateForecastEditorWindowAdapter(ForecastEditorViewModelParameters parameters)
		{
			return new ForecastEditorWindowAdapter(
				WindowFactory.CreateWindow(WindowType.ForecastEditor),
				WindowViewModelFactories.CreateForecastEditorViewModelFactory(),
				parameters);
		}

		public override IWindow CreateImportDataManagerWindowAdapter(ImportDataManagerViewModelParameters parameters)
		{
			return new ImportDataManagerWindowAdapter(
				WindowFactory.CreateWindow(WindowType.ImportDataManager),
				WindowViewModelFactories.CreateImportDataManagerViewModelFactory(),
				parameters);
		}

		#endregion
	}
}
